package com.xing.springbootdemo.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.xing.springbootdemo.domain.Book;
import com.xing.springbootdemo.mapper.BookMapper;
import com.xing.springbootdemo.service.BookService;
import lombok.extern.slf4j.Slf4j;
import org.junit.Test;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/*
 * 静，谦虚谨慎，心胸宽广容纳所有好的坏的、先苦后甜
 * springbootdemo
 * 2021/11/21 12:37
 */
@Service
@Slf4j
public class BookServiceImpl extends ServiceImpl<BookMapper,Book> implements BookService {

    @Resource
    private BookMapper bookMapper;

    @Override
    public List<Book> findAll() {
        return bookMapper.selectAll();
    }

    @Override
    public List<Book> getAll() {
        return bookMapper.selectAll2();
    }

    @Override
    public Book getBookById(Integer id) {
        return bookMapper.selectById(id);
    }

}